import type { IModalConfig } from '@/components/page-modal/type';

const modalConfig: IModalConfig = {
  pageName: 'goods',
  header: {
    titleOnCreate: '新建商品',
    titleOnEdit: '编辑类别'
  },
  formItems: [
    {
      type: 'input',
      label: '商品名称',
      prop: 'name',
      placeholder: '请输入商品名称'
    },
    {
      type: 'input',
      label: '原价',
      prop: 'oldPrice',
      placeholder: '请输入原价',
      onEditHide: true
    },
    {
      type: 'input',
      label: '现价',
      prop: 'newPrice',
      placeholder: '请输入现价'
    },
    {
      type: 'input',
      label: '商品描述',
      prop: 'desc',
      placeholder: '请输入商品描述'
    },
    {
      type: 'select',
      label: '状态',
      prop: 'status',
      placeholder: '请选择商品状态',
      options: [
        {
          label: '上架',
          value: 1
        },
        {
          label: '下架',
          value: 0
        }
      ]
    },
    {
      type: 'input',
      label: '图片 URL',
      prop: 'imgUrl',
      placeholder: '请输入商品图片链接'
    },
    {
      type: 'input',
      label: '库存数量',
      prop: 'inventoryCount',
      placeholder: '请输入库存数量'
    },
    {
      type: 'input',
      label: '收藏数',
      prop: 'favorCount',
      placeholder: '请输入收藏数',
      onEditHide: true
    },
    {
      type: 'input',
      label: '所在地',
      prop: 'address',
      placeholder: '请输入商品所在地'
    }
  ]
};

export default modalConfig;
